<form nz-form [formGroup]="validateForm" class="mt20">
  <nz-form-item>
    <nz-form-label [nzSpan]="7" nzFor="regexexpression" title="正则表达式" nzRequired>正则表达式</nz-form-label>
    <nz-form-control [nzSpan]="13" [nzErrorTip]="combineTpl">
      <input class="ant-input" nz-input id="regexexpression" autocomplete="off" formControlName="regexexpression" placeholder="请输入正则表达式" />
    </nz-form-control>
  </nz-form-item>
</form>

<ng-template #combineTpl let-control>
  <ng-container *ngIf="control.hasError('required')">必填项</ng-container>
  <ng-container *ngIf="control.hasError('pattern')">无效的正则表达式</ng-container>
</ng-template>
